The Layers of Larceny’s Foreign Function Interface

نویسنده

  • Felix S Klock
چکیده

The Foreign Function Interface (FFI) in Larceny supports interacting with dynamically loaded C libraries via glue code written in Scheme. The programmer does not need to develop any C code to interface with C libraries. The FFI is divided into layers of Larceny Scheme code; the lower layers implement kernel functionality, and the higher layers support portable glue code development. The lower level has two main features of interest. First, the FFI supports callbacks: objects that look like simple function pointers to foreign code but invoke Scheme closures when called. This requires generating specialized machine code, and is further complicated by the potential movement of the closures during garbage collections. Second, Larceny heaps can be dumped to disk and reloaded during a fresh runtime execution. The FFI automatically relinks the foreign procedures in such heaps. The higher level layers provide macros and procedures for extracting information from header files and dictating how values translate between Scheme and foreign code. These tools ease development of portable glue code. The upper layers have simple implementations and do not require much Larceny-specific functionality; they may be useful for the FFIs of other Scheme systems.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Application of Au@SiO2 Plasmonic Nanoparticles at Interface of TiO2 Mesoporous Layers in Perovskite Solar Cells

To investigate the plasmonic effect in perovskite solar cells, the effect of depositing Au@SiO2 nanoparticles on the top and the bottom of mesoporous TiO2 layers was studied. First, Au@SiO2 nanoparticles were synthesized. The particles were then deposited at the different interfaces of mesoporous TiO2 layers. Although the two structures show approximately similar optical absorption, only cells ...

متن کامل

محاسبه سطح مشترک (111)Pb/Si با استفاده از نظریه تابعی چگالی

  Work function and surface energy per unit area were calculated in the framework of density functional theory (DFT) with Linearized A ug mented Plane Wave Plus Local Orbital method in full potential for a clean symmetric slab of silicon containing two (top and bottom) surfaces. The surfaces were theoretically modeled using supercell technique by stacking a variety of silicon layers along (111)...

متن کامل

Fracture Analysis of a FGM Strip Containing Multiple Interface Cracks Sandwiched between Two Homogeneous Layers

A FGM layer sandwiched between two isotropic layers weakened by several interface cracks under antiplane loading is studied. This paper examines the modelling of cracks by distribution of strain nuclei along crack lines. In this investigation, the Volterra-type screw dislocation employed between FGM and an elastic layer. To solve the dislocation problem, the complex Fourier transform is applied...

متن کامل

بازتاب و شکست موج SH در مرز ناهموار بین دو محیط ایزوتروپ جانبی

The existing theory for wave propagation through a soil layer are not compatible with the real soil layers because in the theory the layers are flat and the sub-layers are parallel, while in real the soil layers are not flat and they may not be parallel. Thus, wave propagations through a corrugated interface are so important. In this paper, a two-dimensional SH-wave propagation through a corrug...

متن کامل

Fracture Analysis of a FGM Strip Containing Multiple Interface Cracks Sandwiched Between Two Homogeneous Layers

A FGM layer sandwiched between two isotropic layers weakened by several interface cracks under antiplane loading is studied. This paper examines the modelling of cracks by distribution of strain nuclei along crack lines. In this investigation, the Volterra-type screw dislocation employed between FGM and an elastic layer. To solve the dislocation problem, the complex Fourier transform is applied...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008